package model

import "database/sql"

type ColumnInfo struct {
	ColumnName    string         `db:"column_name"`
	DataType      string         `db:"data_type"`
	ColumnType    string         `db:"column_type"`
	IsNullable    string         `db:"is_nullable"`
	ColumnKey     string         `db:"column_key"`
	ColumnDefault sql.NullString `db:"column_default"`
	Extra         string         `db:"extra"`
	ColumnComment string         `db:"column_comment"`
}

type TableInfo struct {
	TableName string       `db:"table_name"`
	Columns   []ColumnInfo `db:"columns"`
}

type FieldInfo struct {
	Name     string // Go字段名
	Type     string // Go类型
	Tag      string // GORM tag
	Json     string // JSON tag
	Comment  string // 字段注释
	IsPK     bool   // 是否主键
	Nullable bool   // 是否可空
}